<?php
class TipoTelefono extends AppModel {
	var $name = 'TipoTelefono';
	var $useTable = 'tipos_telefonos';
	var $displayField = 'nombre';
	var $validate = array(
		'id' => array(
			'blank' => array(
				'rule' => array('blank'),
				'on' => 'create' 
			)
		),
		'nombre' => array(
			'maxlength' => array(
				'rule' => array('maxLength', '50')
			),
			'notEmpty' => array(
				'rule' => array('notEmpty')
			)
		)
	);
	
	var $hasMany = array(
		'PersonaTelefono' => array(
			'className' => 'PersonaTelefono',
			'foreignKey' => 'tipo_telefono_id'
		)
	);
}
?>